<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!-- <script src="https://unpkg.com/vue@next"></script> -->
    <script src="https://unpkg.com/vue@3.0.5/dist/vue.global.js"></script>
  </head>
  <body>
    <div id="app"></div>
    <script>
      Vue.createApp({
        //数据
        data() {
          return {
            count: 0,
          };
        },
        //首次渲染后执行
        mounted() {
          setInterval(() => {
            this.count += 1;
          }, 1000);
        },
        //模板
        template: `
          <div>
            hello
            <div>{{count}}</div>
          </div>
        `,
      }).mount("#app");
    </script>
  </body>
</html>
